# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=libwps
pkgver=0.4.12
pkgrel=0
pkgdesc="Import filter and tools for Microsoft Works files"
url="https://sourceforge.net/projects/libwps/"
arch="all"
license="MPL-2.0"
depends_dev="librevenge-dev"
makedepends="$depends_dev doxygen"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://downloads.sourceforge.net/project/libwps/libwps/libwps-$pkgver/libwps-$pkgver.tar.bz2"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	amove usr/bin
}

sha512sums="1d698969a7d95a9bcff6a69fea4fb46a136c3d4111a8d0f02dbaf7fcf70716049a50d81acff457351d9f22a7d86abe7188c4d96a246e57eb3de4e5eb1f903ff6  libwps-0.4.12.tar.bz2"
